package com.example.erp.mapper;

import com.example.erp.dto.loginDTO.LoginDTO;
import com.example.erp.pojo.permission.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {
    @Select("SELECT * FROM erp_users WHERE username = #{username}")
    User login(LoginDTO loginDTO);

    @Select("SELECT * FROM erp_users WHERE username = #{user.username}")
    User loginUsername(@Param("user") LoginDTO loginDTO);
}
